// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

 
	function switchTag(tag,content)
	{
		var maxMenusCount = 20;
	
		for (i = 1; i < maxMenusCount; i++) {
			if (document.getElementById("tag" + i)) {
			if ("tag" + i == tag) {
				document.getElementById(tag).getElementsByTagName("a")[0].className = "selectli" + i;
				document.getElementById(tag).getElementsByTagName("a")[0].getElementsByTagName("span")[0].className = "selectspan" + i;
			}
			else {
				document.getElementById("tag" + i).getElementsByTagName("a")[0].className = "";
				document.getElementById("tag" + i).getElementsByTagName("a")[0].getElementsByTagName("span")[0].className = "";
			}
			if ("content" + i == content) {
				document.getElementById(content).className = "";
			}
			else {
				document.getElementById("content" + i).className = "hidecontent";
			}
			document.getElementById("content").className = content;
		}
	}
	}
		var iframeids=["subMainFrame"]
		var iframehide="yes"
		function dyniframesize() 
		{
		
			var dyniframe=new Array()
			for (i=0; i<iframeids.length; i++)
			{
				if (document.getElementById)
				{
					dyniframe[dyniframe.length] = document.getElementById(iframeids[i]);
					if (dyniframe[i] && !window.opera)
					{
						//dyniframe[i].style.display="block"
						if (dyniframe[i].contentDocument && dyniframe[i].contentDocument.body.offsetHeight)
						 {
							dyniframe[i].height = dyniframe[i].contentDocument.body.offsetHeight +120;
						}
						else {
							if (dyniframe[i].Document && dyniframe[i].Document.body.scrollHeight) 
								dyniframe[i].height = dyniframe[i].Document.body.scrollHeight  +120;
						}
					}
				}
				if ((document.all || document.getElementById) && iframehide=="no")
				{
					var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
					tempobj.style.display="block"
				}
			}
		}
